package com.bai;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created by Admin on 9/15 0015.
 */
public class Test {
    public static void main(String[] args){
        ApplicationContext context=new ClassPathXmlApplicationContext("app.xml");
//        Printer printer=context.getBean(Printer.class);
        Printer printer= (Printer) context.getBean("printer");
        System.out.println(printer);
        printer.print();
    }
}
